Optimal. Leaf size=31 \[ \frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {i \sec (c+d x)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3092, 3090, 3770, 2606, 8} \[ \frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {i \sec (c+d x)}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2606
Rule 3090
Rule 3092
Rule 3770
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx &=-\frac {i \int \sec ^2(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2}\\ &=-\frac {i \int (i a \sec (c+d x)+a \sec (c+d x) \tan (c+d x)) \, dx}{a^2}\\ &=-\frac {i \int \sec (c+d x) \tan (c+d x) \, dx}{a}+\frac {\int \sec (c+d x) \, dx}{a}\\ &=\frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {i \operatorname {Subst}(\int 1 \, dx,x,\sec (c+d x))}{a d}\\ &=\frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {i \sec (c+d x)}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 35, normalized size = 1.13 \[ -\frac {i \left (\sec (c+d x)+2 i \tanh ^{-1}\left (\cos (c) \tan \left (\frac {d x}{2}\right )+\sin (c)\right )\right )}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.61, size = 80, normalized size = 2.58 \[ \frac {{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 2 i \, e^{\left (i \, d x + i \, c\right )}}{a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.58, size = 58, normalized size = 1.87 \[ \frac {\frac {\log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a} - \frac {\log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a} + \frac {2 i}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.21, size = 85, normalized size = 2.74 \[ \frac {i}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}-\frac {i}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 83, normalized size = 2.68 \[ \frac {\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {2}{-i \, a + \frac {i \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.67, size = 43, normalized size = 1.39 \[ \frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {2{}\mathrm {i}}{a\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sec ^{2}{\left (c + d x \right )}}{i \sin {\left (c + d x \right )} + \cos {\left (c + d x \right )}}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________